import { httpDelete, httpGet, httpPost, httpPut } from '../utils/http'


// 查询居民数据------currentPage、pageSize、state、organization、team、servicePack、tags
export const findResidentsApi = (data) =>{
    return httpPost('/residents/search',data)
}

// 新增居民------name、IDnumber、gender、birthday、phone、address、tags、password
export const addResidentsApi = (data) =>{
    return httpPost('/residents/add',data)
}

// 修改居民
export const updateResidentsApi = (data) =>{
    return httpPut('/residents/update',data)
}

// 删除居民
export const deleteResidentsApi = (data) =>{
    return httpDelete('/residents/remove',data)
}

// 修改居民信息和头像
export const updateResidentsAvatarApi = (data) =>{
    return httpPost('/residents/updateAvatar',data)
}

// 获取居民详情
export const getResidentsDetailApi = (data) =>{
    return httpGet('/residents/detail',data)
}



// 查询居民关系
export const getRelationSearchApi = (data)=>{
    return httpPost('/relations/search',data)
}

// 添加居民关系
export const addRelationSearchApi = (data)=>{
    return httpPost('/relations/add',data)
}